import { Button, Row, Col, Table, Form, Input, Icon, Tag, Divider, Pagination, message, notification } from 'ant-design-vue';

// 直接使用Vue.use的组件
const comps = [
    Row,
    Col,
    Button,
    Table,
    Form,
    Input,
    Pagination,
    Icon,
    Tag,
    Divider,
];

// 需要挂载在Vue.prototype上使用的组件
const prototypes = {
    message,
    notification,
}

export function registerAntd(Vue) {
    comps.forEach((comp) => {
        Vue.use(comp);
    });
    Object.keys(prototypes).forEach(key => {
        Vue.prototype[`$${key.toLowerCase()}`] = prototypes[key]
    })
}
